﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="自定义分页.aspx.cs" Inherits="自定义分页" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>asp.net自定义分页</title>
    <style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
a {
	font-size: 9pt;
	color: #666666;
}
a:visited {
	color: #666666;
	text-decoration: none;
}
a:hover {
	color: #FFFFFF;
	text-decoration: underline;
}
a:active {
	color: #666666;
	text-decoration: none;
}
a:link {
	text-decoration: none;
}
-->
</style>
</head>
<body style="font-size: 9pt; cursor: crosshair;">
    <form id="form1" runat="server">
    <div>
    <asp:DataGrid runat=server ID=Fenye AllowPaging="True" AutoGenerateColumns="False" BackColor="#E0E0E0" BorderColor="#400040" ShowHeader="False" PageSize="1" Width="189px">
        <Columns>
            <asp:TemplateColumn HeaderText="Content">
                <EditItemTemplate>
                    <asp:TextBox runat="server"  ID=b2fsdfdsf Text='<%# DataBinder.Eval(Container, "DataItem.Content") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label runat="server"  id=a212 Text='<%# formatText(DataBinder.Eval(Container, "DataItem.Content").ToString()) %>' Font-Size="9pt"></asp:Label>
                </ItemTemplate>
            </asp:TemplateColumn>
        </Columns>
        <PagerStyle Visible="False" />
        <AlternatingItemStyle BackColor="#E0E0E0" Font-Names="Arial" ForeColor="DimGray" />
        <ItemStyle BackColor="Silver" BorderColor="Lime" BorderStyle="Groove" />
    </asp:DataGrid><br />
        &nbsp;
						<asp:linkbutton id="btnFirst" onclick="PageButtonClick" runat="server" CommandArgument="0" >最首頁</asp:linkbutton>
						<asp:linkbutton id="btnPrev" onclick="PageButtonClick" runat="server" CommandArgument="prev">前一頁</asp:linkbutton>
						<asp:linkbutton id="btnNext" onclick="PageButtonClick" runat="server" CommandArgument="next">下一頁</asp:linkbutton>
						<asp:linkbutton id="btnLast" onclick="PageButtonClick" runat="server" CommandArgument="last">最後頁</asp:linkbutton>
						<asp:Label ID="Ccount" runat="server" Text="Label"></asp:Label>
    </div>

    </form>
</body>

</html>
